<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <!--引入Vue-->
  <script type="text/javascript" src="../js/vue.js"></script>
  <title></title>
</head>

<body>
  <!--准备好一个容器-->
  <div class="root">
    <ul>
      <li v-for="p in persons">
        {{p.name}}-{{p.age}}
      </li>
      <li v-for="(key,value) of car">
        {{key}}-{{value}}
      </li>
      <li v-for="(key,value) of str">
        {{key}}-{{value}}
      </li>
      <li v-for="(number,index) of 5">
        {{number}}}-{{index}}
      </li>
    </ul>
  </div>

  <script type="text/javascript">
    Vue.config.productionTip = false;

    new Vue({
      el: '.root',
      data: {
        persons: [
          { id: '001', name: '张三', age: 18 },
          { id: '002', name: '李四', age: 19 },
          { id: '003', name: '王二麻', age: 20 }
        ],
        car: {
          name: '奥迪',
          price: '10w',
          color: 'black'
        },
        str:'hello world'
      }
    })
  </script>
</body>

</html>